<?php

namespace app\admin\validate;


class AdminGroupValidate extends BaseValidate
{
    protected $rule = [
        'id' => 'require',
        'title' => 'require|length:0,50',
        'description' => 'length:0,200',
        'menu_ids' => 'require|array',
    ];
    protected $message = [
        'id.require' => 'ID不能为空',
        'title.require' => 'ID不能为空',
        'title.length' => '标题超出长度',
        'description.length' => '描述超出长度',
        'ids.require' => '配置项不能为空',
        'menu_ids.array' => '配置项数据格式错误',
    ];
    protected $scene = [
        'create' => ['title', 'description', 'menu_ids', 'status'],
        'update' => ['id', 'title', 'description', 'menu_ids', 'status'],
    ];
}